var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = Schema.ObjectId;

var UserSchema = new Schema({
    userName: String,
    password: String,
    role: String,
    createDate: { type: Date, default: Date.now },
    friends: [     // 好友列表
        {
            friendId: ObjectId,  //好友ID
            remarks: String,   // 备注
        }
    ],
});

mongoose.model('User', UserSchema);